<?php
// autor Jiří Němec <nemec.jiri@gmail.com>
header('Content-type: text/javascript');
header("Cache-Control: must-revalidate");
header("Expires: ".gmdate("D, d M Y H:i:s", time() + 60*60*24*2)." GMT");
$gz = false;
if (ereg('gzip',$_SERVER['HTTP_ACCEPT_ENCODING']) && !(eregi('msie',$_SERVER['HTTP_USER_AGENT']))) $gz = true;
if ($gz) ob_start("ob_gzhandler");
if ($gz) echo '/* komprese zapnuta */';
foreach ($_GET as $key => $val){
 if(file_exists($key.'.js')) {
  $fp = fopen($key.'.js', 'r');
  fpassthru($fp);
  fclose($fp);
 }
}
if ($gz) ob_end_flush();
?>